package cn.cds.withyou.lib.model;

import android.database.Cursor;
import android.support.annotation.NonNull;

import java.io.Serializable;

import cn.cds.withyou.lib.Constants;

/**
 * <p> Description: </p>
 * <p/>
 * <p> Copyright: Copyright (c) 2016 </p>
 *
 * @author: Json.Lee
 * @Version: 1.0
 * @CreateTime: 25/4/2016 15:20
 */
public class UserDto implements Serializable {

    public UserDto () {

    }

    public UserDto (@NonNull Cursor cursor) {
        id = cursor.getString(cursor.getColumnIndex(Constants._ID));
        phone = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._PHONE_ITEM));
        passwd = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._PASSWD_ITEM));
        gender = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._GENDER_ITEM));
        info = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._INFO_ITEM));
        name = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._NAME_ITEM));
        qq = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._QQ_ITEM));
        college = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._COLLEGE_ITEM));
        professtion = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._PROFESSION_ITEM));
        token = cursor.getString(cursor.getColumnIndex(Constants.UserInfo._TOKEN_ITEM));
    }

    private String id;
    private String phone;
    private String passwd;
    private String gender;
    private String info;
    private String name;
    private String qq;
    private String college;
    private String professtion;
    private String token;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public String getProfesstion() {
        return professtion;
    }

    public void setProfesstion(String professtion) {
        this.professtion = professtion;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
